package data 
{
	import flash.display.Sprite;
	import iscript.gameFramework.GameLite.system.reflection.Reflection;

	public class updateExample extends Sprite
	{
		
		private var data:Vector.<SportPlayerStream>
		public function updateExample() 
		{
			data = new Vector.<SportPlayerStream>();
			
			var player:SportPlayerStream = new SportPlayerStream();
			    player.name = "raymond"
				player.id = 10000;
				player.age = 20;
				
				//data.push(player);
			 
			 
			 
			
			 var player2:SportPlayerStream = new SportPlayerStream();
			    player2.name = "raymond2"
				player2.id = 20000;
				player2.age = 30;
             
			 
			 var r:Reflection = new Reflection(player)
			 
			
			 for each ( var name:String in r.variable.names) {
				     trace(name) 
				     if(name!="id"){
				       r.variable.set(name, player2[name])
					 }
				 }
			
			 for each ( var p:String in r.accessor.names) {
				
				  r.accessor.set(p, player2[p])
			 }
				 
				 trace(player2);
				 
		}
		
		
		
		
	}

}

 